const express = require('express');
const app = express();

app.use((req,res,next)=>{
    res.setHeader("Access-Control-Allow-Origin", '*');
    next();
});

app.get('/home',(req,res)=>{
    res.send({name:'home',msg:'express home get'})
})

app.get('/news',(req,res)=>{
    res.send({name:'home',msg:'express news get'})
})

app.get('/add',(req,res)=>{
    res.send({name:'home',msg:'express add get'})
})

app.listen(3000,()=>{
    console.log('3000 running')
})

